﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>
    var jsonStr = '{"name":"zhangsan","age":23,"addr":["北京","上海","西安"}';
    //alert(jsonStr);

    let jsObject = JSON.parse(jsonStr);
    // alert(jsObject);
    let name = jsObject.name;
    alert(name);

</script>
</body>
</html>